<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="object.js"></script>
</head>
<body>
<script type="text/javascript">
var s={a:1,b:5};
var t={c:2,d:6};
var x=extend().call(s,s,t);

</script>



 <div style="background:#00F; width:100px; height:20px; margin-bottom:10px;" class="1">点击我1</div>
  <div style="background:#00F; width:100px; height:20px;  margin-bottom:10px;" class="2">点击我2</div>
   <div style="background:#00F; width:100px; height:20px; margin-bottom:10px;" class="3">点击我3</div>
    <div style="background:#00F; width:100px; height:20px; margin-bottom:10px;" class="4">点击我4</div>
     <div style="background:#00F; width:100px; height:20px; margin-bottom:10px;" class="5">点击我5</div>
      <div style="background:#00F; width:100px; height:20px; margin-bottom:10px;" class="6">点击我6</div>
       <div style="background:#00F; width:100px; height:20px; margin-bottom:10px;" class="7">点击我7</div>
</body>
<script type="text/javascript">
var div=document.getElementsByTagName("div");
each(div,function(v,k){
		var self=this;
		v.onclick=function(){alert(self.length)};	
},div)




each(div,function(v,k){
		this.onclick=function(){alert(this.innerHTML)};	
})
</script>
</html>
